<template>
  <div class='pubsub'>
		发布消息
		<button @click="btnFn">button</button>
     
		<asd ></asd>
  </div>
</template>

<script>
 import PubSub from 'pubsub-js'
 
 import asd from './pubsub1.vue'

export default {
  name: 'pubsub1',
	components: { asd },
  data () {
    return { 
      imgurlArr: []
    }
  },
  methods: {     
    btnFn () {
      PubSub.publish('search', '22222')
    }
  }
}
</script>
<style scoped>  

</style>
